#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QtSerialPort/QSerialPort>
#include <QtSerialPort/QSerialPortInfo>
#include "receivethread.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    QSerialPort *mycom;             //串口
    QByteArray RequestData;         //接收数据
    ReceiveThread *receivethread;   //读串口线程
    void send_uart_string(char *);  //发送数据

private slots:
    void RxData();
    void on_openButton_clicked();//打开串口
    void display(char *);//显示
    void on_closeButton_clicked();

signals:

private:
    Ui::MainWindow *ui;
    double a[4],w[4],h[4],Angle[4],Port[4];
    double Temperature,Pressure[2],Altitude[2];
};

#endif // MAINWINDOW_H
